package com.chuangshixinchen.enterprise.entityGen;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;

import javax.persistence.*;
import javax.validation.constraints.Email;
import javax.validation.constraints.NotEmpty;
import java.util.Date;

@Entity//与数据库相对应
@Table(name = "tb_user")//用户表
@Data
public class User {
        @Id//主键
        @GeneratedValue(strategy = GenerationType.IDENTITY)//自增长
        private Long id;
        private Long enterpriseId;//对应企业Id
        private String institutionCode;//部门编号
        private Date createTime;
        private Date updateTime;
        private String realName;
        private String nickName;
        private String avatarUrl;
//        @TableField(select = false)//密码不查询
        private String password;
        private String language;
        private String phone;
        private String shortPhone;//内部短号
        private String idCard;
        private String email;
        private String address;
        private String openId;
        private String unionId;
        private String secondOpenId;
        private String gender;
        @Column(columnDefinition = "int default 0")
        private Integer age;
        private String province;
        private String city;
        private String country;
        private String permissions;//权限
        private String remark;
}
